<div class="loading">&nbsp;</div>
<div class="clearfix">
	<?php echo $this->element('album_ctrl');?>

		<div id="grid">
			<div id="sort">
				<?php
				foreach($data as $album) {
					$url_path = HOSTNAME.'/albums/category/'.$album['Album']['id'];
				?>
				<div class="box<?php echo ($album['Album']['is_featured'])?' featbox':'';?>">
					<div class="box_img">
						<a href="<?php echo $url_path?>"><img width="320" title="weee-man" alt="<?php echo $album['Album']['title'];?>" class="thumbnail wp-post-image" src="<?php echo HOSTNAME.'/thumbs/?src=/app/webroot/img/albums/'.$album['Album']['path'].'&w=300&zc=1&q=100';?>" style="opacity: 1;"></a>
						<h1><a href="<?php echo $url_path?>"><?php echo $album['Album']['title'];?></a></h1>
					</div>
					<div class="fb_like_index">
					<fb:like href="<?php echo $url_path;?>"
									   layout="button_count"
									   show_faces="false"
									   action="like"
									   colorscheme="light"></fb:like>
					</div>
					<p><?php echo $album['Album']['description'];?></p>
					<a href="<?php echo $url_path?>" class="boxa"><span>Read More &raquo;</span></a>
					<!-- <p class="postmetadata"> Stack | <a rel="category tag" title="View all posts in Sculpture" href="#">Dishes</a>  </p> -->																				
				</div>				
				<?php } ?>			
			</div>
		</div>
</div>

<?php
if ($page_number = $paginator->numbers(array('separator'=>null))) {
	echo $html->div(
  		'paginate box',
  		$page_number,array('style'=>'float:none;'));
}
?>
<br/>
<?php echo $this->element('facebook_api');?>